﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;

namespace Vision.Common
{
    public class OrderedNameValueConfigurationElement : NamedConfigurationElement
    {
        #region Const
        const string OrderPropertyName = "order";
        const string ValuePropertyName = "value";
        #endregion

        #region Ctors
        public OrderedNameValueConfigurationElement()
            : base()
        {
        }
        public OrderedNameValueConfigurationElement(string name)
            : base(name)
        {
        }
        #endregion

        #region Properties
        [ConfigurationProperty(OrderPropertyName)]
        public int Order
        {
            get { return (int)this[OrderPropertyName]; }
            set { this[OrderPropertyName] = value; }
        }
        [ConfigurationProperty(ValuePropertyName)]
        public string Value
        {
            get { return (string)this[ValuePropertyName]; }
            set { this[ValuePropertyName] = value; }
        }
        #endregion
    }
}